package com.fanco.learn_datastruct_leetcode.designpattern.composite;

/**
 * @author qiaowang 2022/2/15
 * 描述
 */
public class Department extends OrganizationComponent{
    public Department(String name, String desc) {
        super(name, desc);
    }

    // add removce方法就不用写了，因为它是叶子节点。
    @Override
    public String getName() {
        return super.getName();
    }

    @Override
    public String getDesc() {
        return super.getDesc();
    }

    @Override
    protected void print() {
        System.out.println(getName());
    }
}
